<template>
	<u-popup v-model="value" mode="center">
		<view class="stationed-in">
			<view class="stationed-in-action">
				<view class="iconfontPT iconclose stationed-in-action__close" @click="handleClose"></view>
			</view>
			<view class="stationed-in-body">
				<view class="stationed-in-body__button" type="default" @click="handleJump">商户入驻</view>
			</view>
		</view>
	</u-popup>
</template>

<script>
export default {
	props:{
		value:{
			type:Boolean,
			default:false
		},
		type:{
			type:String,
			default:null
		}
	},
	model:{
		prop:'value',
		event:'input'
	},
	methods:{
		handleClose(){
			this.$emit('close',false)
			this.$emit('input',false)
		},
		handleJump(){			
			if(!uni.getStorageSync('openId')){
				uni.navigateTo({url: '/pages/authorize'});
			}else{
				uni.navigateTo({
					url:`/pages/personal/join/index?type=${this.type}`
				})
			}
		}
	}
};
</script>

<style lang="scss">
.stationed-in-action{
	display: flex;
	justify-content: flex-end;
	&__close{
		font-size: 60rpx;
		color: #FFFFFF;
		margin-bottom: 20rpx;
	}
}
.stationed-in-body{
	width: 575rpx;
	height: 663rpx;
	border-radius: 30rpx;
	background: url('http://cdn1.cheyizhuan.com/common/shrz.png') no-repeat center / 100%;
	position: relative;
	&__button {
		position: absolute;
		bottom: 44rpx;
		left: 50%;
		transform: translateX(-50%);
		width: 288rpx;
		height: 74rpx;
		background-color: #f14434;
		box-shadow: 0px 8px 12px 6px rgba(241, 68, 52, 0.16);
		border-radius: 37rpx;
		color: #FFFFFF;
		display: flex;
		justify-content: center;
		align-items: center;
	}
}
</style>
